//
//  SYS_StoreContactView.m
//  System_App
//
//  Created by czy001 on 2017/12/4.
//  Copyright © 2017年 czy001. All rights reserved.
//

#import "SYS_StoreContactView.h"

@implementation SYS_StoreContactView

//图片高度和字体大小
- (id)initWithFrame:(CGRect)frame
{
    self=[super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor=[UIColor whiteColor];
        
        _photo=[[UIImageView alloc] initWithFrame:CGRectMake(13, 10, 30, 30)];
        _photo.image=[UIImage imageNamed:@"message_mengdian"];
        [self addSubview:_photo];
        
        _title=[[UILabel alloc] initWithFrame:CGRectMake(55, _photo.center.y-10, 150, 20)];
        _title.text=@"门店通讯录";
        _title.font=[UIFont systemFontOfSize:15];
        [self addSubview:_title];
        
        UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGoStoreList)];
        tap.numberOfTapsRequired=1;
        [self addGestureRecognizer:tap];
        
        UIImageView *rowImg=[[UIImageView alloc] initWithFrame:CGRectMake(SCREENWIDTH-20, 16, 8, 16)];
        rowImg.image=[UIImage imageNamed:@"message_jiantou"];
        [self addSubview:rowImg];
    }
    
    return self;
}

//点击跳转门店列表
- (void)tapGoStoreList
{
    if (_delegate && [_delegate respondsToSelector:@selector(buttonClickTapToStoreList)]) {
        [_delegate buttonClickTapToStoreList];
    }
}

@end
